package jtg;

import soot.Unit;
import soot.toolkits.graph.UnitGraph;

import java.util.ArrayList;
import java.util.List;

public class DataFlowGraph {
    public List<String> def;
    public int[][] d;
    public int[][] u;

    public DataFlowGraph(){
        this.def=new ArrayList<>();
        this.d=new int[999][999];
        this.u=new int[999][999];
    }
    public void addDef(String s){def.add(s);}
    public void addd(Unit un, String s, List<String>def, DirectedGraph dg)
    {
        d[dg.vertex.indexOf(un)][def.indexOf(s)]=1;
    }
    public void addu(Unit un, String s, List<String>def, DirectedGraph dg)
    {
        u[dg.vertex.indexOf(un)][def.indexOf(s)]=1;
    }
}

